<div class="form">

<?php $form=$this->beginWidget('BActiveForm', array(
	'id'=>'admin-form',
    'enableClientValidation'=>true,
    'enableAjaxValidation'=>true,
    'clientOptions'=>array(
        'validateOnSubmit'=>true,
    )
)); ?>
    <div class="control-group">
        <label class="control-label"><span class="require">*</span>管理员名称：</label>
        <div class="controls">
            <?php echo $form->textField($model, 'admin_name'); ?>
            <?php echo $form->error($model,'admin_name'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>管理员密码：</label>
        <div class="controls">
            <?php if(!$model->isNewRecord):?>
                <?php echo $form->passwordField($model,'admin_pass', array('placeholder'=>'留空则不修改', 'value'=>'')); ?>　
            <?php else:?>
                <?php echo $form->passwordField($model,'admin_pass'); ?>　
            <?php endif;?>
            <?php echo $form->error($model,'admin_pass'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>确认管理员密码：</label>
        <div class="controls">
            <?php echo $form->passwordField($model,'admin_notpass'); ?>
            <?php echo $form->error($model,'admin_notpass'); ?>
        </div>
    </div>

    <div class="control-group">
        <div class="controls">
            <input type="submit" value="<?php echo $model->isNewRecord ? '添  加' : '修  改';?>" id="submit" class="btn btn-primary"/>
            <input type="button" value="返  回" onclick="javascript:history.back();" class="btn btn-warning"/>
        </div>
    </div>
<?php $this->endWidget(); ?>

</div>